package com.wondertek.service.entity.business;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wondertek.common.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @description:租赁设备管理
 * @author: qinjianhui
 * @create: 2024-07-15 17:11
 **/
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("rental_device")
public class RentalDevicePo extends BaseEntity {

    @NotBlank(message = "app.user.id.not.null")
    @Schema(name = "consumerId",description = "app用户id")
    private String consumerId;

    /*
     * 设备id
     * */
    @Schema(name = "deviceId",description = "设备id")
    private String deviceId;

    @NotBlank(message = "partition.id.not.null")
    @Schema(name = "roomId",description = "分区id")
    private String roomId;

    /*
     * 开始时间
     * */
    @Schema(name = "startDate",description = "开始时间")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;

    /*
     * 结束时间
     * */
    @Schema(name = "endDate",description = "结束时间")
//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;

/*    *//*
     * 开始日期
     * *//*
    @Schema(name = "startDate",description = "开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startDate;

    *//*
     * 结束日期
     * *//*
    @Schema(name = "endDate",description = "结束日期")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endDate;*/

    /*
     * 是否删除：1：是，0：否
     * */
    @Schema(name = "isDelete",description = "是否删除：1：是，0：否")
    private Integer isDelete;
}

